//
// Created by dddgzc on 2025/1/23.
//

#include "../include/MainMenuScene.h"

#include <cstdio>
#include <iostream>

void MainMenuScene::onEnter() {
    printf("Entering Main Menu Scene\n");
}

void MainMenuScene::onDraw(const Camera& camera) {
    int menuBackgroundWidth;
    int menuBackgroundHeight;
    SDL_QueryTexture(menuBackground,nullptr, nullptr,&menuBackgroundWidth, &menuBackgroundHeight);
    int x = (Content::WINDOW_WIDTH - menuBackgroundWidth) / 2;
    int y = (Content::WINDOW_HEIGHT - menuBackgroundHeight) / 2;
    drawImage(camera, menuBackground, x, y);

}

void MainMenuScene::onUpdate(int delta) {

}

void MainMenuScene::onInput(const SDL_Event &e) {
    if (e.type == SDL_KEYDOWN) {
        sceneManager->switchTo(SceneManager::SceneType::PlayerSelectionScene);
    }
}

void MainMenuScene::onExit() {

}
